In the development tests, different tools are used from those used in the system and acceptance tests. A number of
these types of tools are discussed below. They are often a part of the development environment. Many of these types of
tools can be found on the Internet. In addition, there are tools that are used for the system and acceptance tests and
also for the development tests, such as code-coverage tools, monitoring tools, stubs and drivers. These tools are
described in the general part on test tools in Types Of Test Tools. It is worth noting that code-coverage tools are usually
integrated with development environments that support automated unit tests.
The following types of test tools are explained here:
-
Debugger
-
Code-analysis tool
-
Unit test tool.
Debugger
Using a debugger, it is possible, for example, to trace the cause of a specific fault and then to solve
it. Debuggers make it possible, depending on the tool, to view software logic and software data and/or manipulate them
at source and/or object level.
Code-analysis tool
There are tools that use the (source) code as input and, based on that, carry out all kinds of statistical
analyses and checks. The aim is not so much to detect “hard faults”, but to detect “unsafe” programming and
fault-sensitive code. This provides the tester, for example, with information on the maintainability of the system.
This information is also used to recognise more complex, and so more risk-related, system parts. A relatively higher
level of test effort may be spent on these parts. With these kinds of tools, it is often possible to employ them
independently of the environment (hardware, software, etc.) in which development is being carried out. This relates to
a static test, in contrast to a dynamic test in which the software actually operates. This means that no input or
output data is necessary and that the software does not generate any output. The tools often have certain code-analysis
possibilities in the development environment. For example, compilers often have all kinds of built-in monitoring
possibilities. Also, such tools are commercially available or self-built. For example, a tool that checks the code for
(a part of the) norms and standards. The functionalities on which static analysis tools focus are roughly divided into
three groups:
-
Analysis of the code structure - Is the structure of a unit or module set up in a particular way? The tool will
try, for example, to generate a Nassi-Shneiderman diagram. If this fails, a structure fault will be detected. By
means of structure analyses, an assessment of the software architecture is provided.
-
Code lines - Has the development been done according to the norms and standards? Does the code comply with the
style guide (e.g. are there sufficient comment lines or has appropriate indentation taken place)? Is every field in
a unit given a value before it is used? Are any endless loops being created? Are the various types of variables
perhaps being wrongly interspersed and used? Compilers often offer functionalities to answer these questions. For
example, besides syntax monitoring, compilers can build in certain runtime checks as standard and detect
non-initialled variables, unused code and infinite loops. Most compilers also produce an overview of variables and
the use of these – the cross-reference overviews. HTML monitoring tools are available for web applications.
-
Code metrics - With the aid of this functionality, metrics can be generated in respect of the code, including in
terms of size, complexity or frequency of comments. An example of a complexity metric is the McCabe formula
[McCabe, 1976], with which a statement is made on the degree of complexity of the units. By complexity is meant the
number of paths that can be taken within a unit. The basis of McCabe’s theory is that with the increase in the
number of decision points in a unit, the complexity of the unit also increases, and equally the chances of defects.
Unit test tool
Tools for the unit test are specific to the programming language. It is used by the developer to create test scripts
that automatically test a unit or a piece of code in a test harness. The test cases are then included as code within
the (source) code. There is often a simple management function around a unit test tool to manage several scripts for
the various unit tests. With the rise of test driven development, unit test tools are attracting increasing attention.
|